<template>
  <div class='wrap'>
    <div class='container '>
      <div class="info">
        <div class="row-one">
          <a><el-avatar :size="40" :src="circleUrl"></el-avatar></a>
          <a>China-Quanda</a>
        </div>
        <div class="row-two">
           <el-button type="primary" icon="el-icon-edit" size="medium" style="width:100%">写文章</el-button>
        </div>
      </div>
      <el-menu
      default-active="2"
      class="el-menu-vertical-demo"
      :router="true"
      @open="handleOpen"
      @close="handleClose">
      <el-menu-item index="/news/creator/home">
        <i class="el-icon-s-home"></i>
        <span slot="title">首页</span>
      </el-menu-item>
      <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-s-marketing"></i>
          <span>管理</span>
        </template>
          <el-menu-item index="/news/creator/article">文章管理</el-menu-item>
          <el-menu-item index="2-2">评论管理</el-menu-item>
      </el-submenu>
        <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-s-data"></i>
          <span>数据</span>
        </template>
          <el-menu-item index="3-1">文章数据</el-menu-item>
          <el-menu-item index="3-2">粉丝数据</el-menu-item>
      </el-submenu>
        <el-submenu index="4">
        <template slot="title">
          <i class="el-icon-question"></i>
          <span>帮助</span>
        </template>
          <el-menu-item index="/news/creator/help/question">常见问题</el-menu-item>
      </el-submenu>
      <el-submenu index="5">
        <template slot="title">
          <i class="el-icon-s-tools"></i>
          <span>设置</span>
        </template>
          <el-menu-item index="5-1">创作设置</el-menu-item>
      </el-submenu>
    </el-menu>
    </div>
   </div>
</template>

<script>
  export default {
    name: 'LeftSidebar',
    components: {},
    data() {
      return {
        circleUrl: "https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png",
      };
    },
    created() {},
    methods: {
      handleOpen(key, keyPath) {
        console.log(key, keyPath);
      },
      handleClose(key, keyPath) {
        console.log(key, keyPath);
      }
    }, 
  };
</script>
<style lang="scss" scoped>
.container{
  // width: 100%;
  // height: 100vh;
  background: #fff;
  height: 100vh;
}
.info{
  padding: 30px 15px 15px 15px;
  .row-one{
    display: flex;
    align-items: center;
    a:last-child{margin-left:10px;font-weight:500}
    margin-bottom: 30px;
  }
}
.el-menu {
    border-right: none;
    
}
</style>